export class ValidatorRegexPattern {
    public static readonly phoneNumber = /^(0|86|17951)?(13\d|15[012356789]|17[3678]|18\d|14[57])\d{8}$/;
    public static readonly email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    public static readonly passport = /^([G|g|E|e]\d{8})|((LN|ln|Ln|lN)\d{6})$/;
    // 拼音: 只允许输入字母和空格
    public static readonly pinYin = /^[a-zA-Z\s]*$/;
    // 中国邮编验证
    public static readonly chinaZipCode = /^([0-9]){6}$/;
    public static readonly digits = /^[0-9]+$/;

    // 文件名
    // 参考: https://stackoverflow.com/questions/11100821/javascript-regex-for-validating-filenames
    public static readonly fileName = /^[^\\/:*?"<>|]+$/;

    // 判断是否是数字、字母、中英文标点
    public static readonly isASCII = /^[\x00-\x7F|\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3008|\u3009|\u3010|\u3011|\u300e|\u300f|\u300c|\u300d|\ufe43|\ufe44|\u3014|\u3015|\u2026|\u2014|\uff5e|\ufe4f|\uffe5|\u00b7]*$/;

    //固定电话
    public static readonly telephone = /^((0\d{2,3})-?)?(\d{7,8})(-?(\d{3,}))?$/;
    //是否包含汉字
    public static readonly chineseCode = /.*[\u4e00-\u9fa5]+.*$/;
    public static readonly password=/^(?![\d]+$)(?![a-zA-Z]+$)(?![!#$%^&*]+$)[\da-zA-Z!#$%^&*]{6,25}$/
}
